/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.xcxAdmin.entity.ZtAdmin;

/**
 * 测试数据Entity
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Table(name = "zt_addr", alias = "a", columns = {
		@Column(name = "id", attrName = "id", label = "编号", isPK = true),
		@Column(name = "addr", attrName = "addr", label = "地址"),
		@Column(name = "admin_id", attrName = "ztAdmin.id", label = "小程序用户id"),
		@Column(name = "status", attrName = "status", label = "状态"),
		@Column(name = "name", attrName = "name", label = "名字"),
		@Column(name = "phone", attrName = "phone", label = "手机号码"),
		
		@Column(name = "detailaddr", attrName = "detailaddr", label = "地址"),
		@Column(name = "area", attrName = "area", label = "地址"),
		
		@Column(name = "province", attrName = "province", label = "地址"),
		@Column(name = "city", attrName = "city", label = "地址"),
		@Column(name = "county", attrName = "county", label = "地址"),
		
		@Column(name = "town", attrName = "town", label = "地址"),
		@Column(name = "provincebid", attrName = "provincebid", label = "地址"),
		@Column(name = "citybid", attrName = "citybid", label = "地址"),
		@Column(name = "countybid", attrName = "countybid", label = "地址"),
		@Column(name = "townbid", attrName = "townbid", label = "地址"),
		
		@Column(name = "def_status", attrName = "defStatus", label = "默认状态"),
		
		@Column(name = "create_date", attrName = "createDate", label = "创建时间"),

}, joinTable = {
		@JoinTable(type = Type.LEFT_JOIN, entity = ZtAdmin.class, attrName = "ztAdmin", alias = "z", on = "z.id = a.admin_id", columns = {
				@Column(name = "name", attrName = "name", label = "小程序名称", queryType = QueryType.LIKE),
				@Column(name = "headimgurl", label = "小程序头像", attrName = "headimgurl"), 
				@Column(name = "id", attrName = "id", label = "编号", isPK = true),
		}),
				
}, orderBy = "a.def_status desc,a.create_date DESC")
public class ZtAddr extends DataEntity<ZtAddr> {

	private static final long serialVersionUID = 1L;
	private String province;
	private String city;
	private String county;
	private String addr;
	private ZtAdmin ztAdmin;
	private String status;
	private String name;
	private String phone;
	
	private String detailaddr;//商品详情
	private String area;//地区
	@JsonIgnore
	private Date createDate;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private Date updateDate;
	
	private String defStatus;
	
	private String town;
	private Integer provincebid;
	private Integer citybid;
	private Integer countybid;
	private Integer townbid;
	
	public String getTown() {
		return town;
	}
	public void setTown(String town) {
		this.town = town;
	}
	public Integer getProvincebid() {
		return provincebid;
	}
	public void setProvincebid(Integer provincebid) {
		this.provincebid = provincebid;
	}
	public Integer getCitybid() {
		return citybid;
	}
	public void setCitybid(Integer citybid) {
		this.citybid = citybid;
	}
	public Integer getCountybid() {
		return countybid;
	}
	public void setCountybid(Integer countybid) {
		this.countybid = countybid;
	}
	public Integer getTownbid() {
		return townbid;
	}
	public void setTownbid(Integer townbid) {
		this.townbid = townbid;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getCounty() {
		return county;
	}
	public void setCounty(String county) {
		this.county = county;
	}
	public String getDetailaddr() {
		return detailaddr;
	}
	public void setDetailaddr(String detailaddr) {
		this.detailaddr = detailaddr;
	}
	public String getArea() {
		return area;
	}
	public void setArea(String area) {
		this.area = area;
	}
	public String getDefStatus() {
		return defStatus;
	}
	public void setDefStatus(String defStatus) {
		this.defStatus = defStatus;
	}
	public String getAddr() {
		return addr;
	}
	public void setAddr(String addr) {
		this.addr = addr;
	}
	@JsonIgnore
	public ZtAdmin getZtAdmin() {
		return ztAdmin;
	}
	public void setZtAdmin(ZtAdmin ztAdmin) {
		this.ztAdmin = ztAdmin;
	}
	@JsonIgnore
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	

}